3.9.36 \(\int \frac {x^2}{\sqrt {-1+x} \sqrt {1+x}} \, dx\) [836]

Optimal. Leaf size=26 \[ \frac {1}{2} \sqrt {-1+x} x \sqrt {1+x}+\frac {1}{2} \cosh ^{-1}(x) \]

[Out]

1/2*arccosh(x)+1/2*x*(-1+x)^(1/2)*(1+x)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {92, 54} \begin {gather*} \frac {1}{2} \sqrt {x-1} \sqrt {x+1} x+\frac {1}{2} \cosh ^{-1}(x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2/(Sqrt[-1 + x]*Sqrt[1 + x]),x]

[Out]

(Sqrt[-1 + x]*x*Sqrt[1 + x])/2 + ArcCosh[x]/2

Rule 54

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ArcCosh[b*(x/a)]/b, x] /; FreeQ[{a,
 b, c, d}, x] && EqQ[a + c, 0] && EqQ[b - d, 0] && GtQ[a, 0]

Rule 92

Int[((a_.) + (b_.)*(x_))^2*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[b*(a + b*x
)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 3))), x] + Dist[1/(d*f*(n + p + 3)), Int[(c + d*x)^n*(e +
 f*x)^p*Simp[a^2*d*f*(n + p + 3) - b*(b*c*e + a*(d*e*(n + 1) + c*f*(p + 1))) + b*(a*d*f*(n + p + 4) - b*(d*e*(
n + 2) + c*f*(p + 2)))*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 3, 0]

Rubi steps

\begin {align*} \int \frac {x^2}{\sqrt {-1+x} \sqrt {1+x}} \, dx &=\frac {1}{2} \sqrt {-1+x} x \sqrt {1+x}+\frac {1}{2} \int \frac {1}{\sqrt {-1+x} \sqrt {1+x}} \, dx\\ &=\frac {1}{2} \sqrt {-1+x} x \sqrt {1+x}+\frac {1}{2} \cosh ^{-1}(x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 34, normalized size = 1.31 \begin {gather*} \frac {1}{2} \sqrt {-1+x} x \sqrt {1+x}+\tanh ^{-1}\left (\sqrt {\frac {-1+x}{1+x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2/(Sqrt[-1 + x]*Sqrt[1 + x]),x]

[Out]

(Sqrt[-1 + x]*x*Sqrt[1 + x])/2 + ArcTanh[Sqrt[(-1 + x)/(1 + x)]]

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(39\) vs. \(2(18)=36\).
time = 0.09, size = 40, normalized size = 1.54

method result size
default \(\frac {\sqrt {-1+x}\, \sqrt {1+x}\, \left (x \sqrt {x^{2}-1}+\ln \left (x +\sqrt {x^{2}-1}\right )\right )}{2 \sqrt {x^{2}-1}}\) \(40\)
risch \(\frac {x \sqrt {-1+x}\, \sqrt {1+x}}{2}+\frac {\ln \left (x +\sqrt {x^{2}-1}\right ) \sqrt {\left (1+x \right ) \left (-1+x \right )}}{2 \sqrt {-1+x}\, \sqrt {1+x}}\) \(46\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/(-1+x)^(1/2)/(1+x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*(-1+x)^(1/2)*(1+x)^(1/2)*(x*(x^2-1)^(1/2)+ln(x+(x^2-1)^(1/2)))/(x^2-1)^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 27, normalized size = 1.04 \begin {gather*} \frac {1}{2} \, \sqrt {x^{2} - 1} x + \frac {1}{2} \, \log \left (2 \, x + 2 \, \sqrt {x^{2} - 1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(-1+x)^(1/2)/(1+x)^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(x^2 - 1)*x + 1/2*log(2*x + 2*sqrt(x^2 - 1))

________________________________________________________________________________________

Fricas [A]
time = 0.49, size = 32, normalized size = 1.23 \begin {gather*} \frac {1}{2} \, \sqrt {x + 1} \sqrt {x - 1} x - \frac {1}{2} \, \log \left (\sqrt {x + 1} \sqrt {x - 1} - x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(-1+x)^(1/2)/(1+x)^(1/2),x, algorithm="fricas")

[Out]

1/2*sqrt(x + 1)*sqrt(x - 1)*x - 1/2*log(sqrt(x + 1)*sqrt(x - 1) - x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2/(-1+x)**(1/2)/(1+x)**(1/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 1.31, size = 30, normalized size = 1.15 \begin {gather*} \frac {1}{2} \, \sqrt {x + 1} \sqrt {x - 1} x - \log \left (\sqrt {x + 1} - \sqrt {x - 1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(-1+x)^(1/2)/(1+x)^(1/2),x, algorithm="giac")

[Out]

1/2*sqrt(x + 1)*sqrt(x - 1)*x - log(sqrt(x + 1) - sqrt(x - 1))

________________________________________________________________________________________

Mupad [B]
time = 7.51, size = 194, normalized size = 7.46 \begin {gather*} 2\,\mathrm {atanh}\left (\frac {\sqrt {x-1}-\mathrm {i}}{\sqrt {x+1}-1}\right )-\frac {\frac {14\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^3}{{\left (\sqrt {x+1}-1\right )}^3}+\frac {14\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^5}{{\left (\sqrt {x+1}-1\right )}^5}+\frac {2\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^7}{{\left (\sqrt {x+1}-1\right )}^7}+\frac {2\,\left (\sqrt {x-1}-\mathrm {i}\right )}{\sqrt {x+1}-1}}{1+\frac {6\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^4}{{\left (\sqrt {x+1}-1\right )}^4}-\frac {4\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^6}{{\left (\sqrt {x+1}-1\right )}^6}+\frac {{\left (\sqrt {x-1}-\mathrm {i}\right )}^8}{{\left (\sqrt {x+1}-1\right )}^8}-\frac {4\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {x+1}-1\right )}^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/((x - 1)^(1/2)*(x + 1)^(1/2)),x)

[Out]

2*atanh(((x - 1)^(1/2) - 1i)/((x + 1)^(1/2) - 1)) - ((14*((x - 1)^(1/2) - 1i)^3)/((x + 1)^(1/2) - 1)^3 + (14*(
(x - 1)^(1/2) - 1i)^5)/((x + 1)^(1/2) - 1)^5 + (2*((x - 1)^(1/2) - 1i)^7)/((x + 1)^(1/2) - 1)^7 + (2*((x - 1)^
(1/2) - 1i))/((x + 1)^(1/2) - 1))/((6*((x - 1)^(1/2) - 1i)^4)/((x + 1)^(1/2) - 1)^4 - (4*((x - 1)^(1/2) - 1i)^
2)/((x + 1)^(1/2) - 1)^2 - (4*((x - 1)^(1/2) - 1i)^6)/((x + 1)^(1/2) - 1)^6 + ((x - 1)^(1/2) - 1i)^8/((x + 1)^
(1/2) - 1)^8 + 1)

________________________________________________________________________________________